package com.xuecheng.manage_cms.service;

import com.xuecheng.framework.domain.system.SysDictionary;
import com.xuecheng.manage_cms.dao.DictionaryMongoDbDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ShengJinFeng
 * @version V1.0
 * @ClassName SysDictionaryService
 * @Description (这里用一句话描述这个类的作用)
 * @date 2020/2/3 14:58
 * @since V1.0
 */
@Service
public class SysDictionaryService {

    @Autowired
    private DictionaryMongoDbDao dictionaryMongoDbDao;

    /**
     * @Description 根据字典分类type查询字典信息
     * @author ShengJinFeng
     * @date 2020/2/3
     */
    public SysDictionary getByType(String type) {
        SysDictionary sysDictionary = new SysDictionary();
        sysDictionary.setDType(type);
        return dictionaryMongoDbDao.queryOne(sysDictionary);
    }
}
